// pages/timingOff/timingOff.js
Page({
    data: {
        modalName:"show",
        count:10
    },

    onLoad: function (options) {
        
    },
    shutdown:function(){
        wx.request({ 
          url: "http://ypbitx.natappfree.cc/MyServlet/timer?shutdown=1",
            method: 'GET',
            header: { 
            'content-type': 'application/json',
            },
            success(res) { 
                wx.showToast({
                    title: '关闭成功！', // 标题
                    icon: 'success',  // 图标类型，默认success
                    duration: 1500  // 提示窗停留时间，默认1500ms
                })
              console.log("关闭请求成功",res)
            },
            fail(res) { 
              console.log("关闭请求失败",res)
            }
        })
    },
    hideModal(e) {
        this.setData({
          modalName: null
        })
    },
    
})